<?php

class Application_Form_RoundSettings extends Zend_Form
{

    public function init()
    {
    	$heroclassTbl = new Application_Model_HeroClassTbl();
    	$raceTbl = new Application_Model_RaceTbl();
       	$alias = new Zend_Form_Element_Text('alias');
        $alias->setLabel('Alias(nickname): ')
                 ->setRequired(true);
                              
        $class = new Zend_Form_Element_Select('class');
        $class->setLabel('Select your hero class: ')
                 ->setRequired(true);

    	foreach ($heroclassTbl->fetchAll() as $c) {
   			 $class->addMultiOption($c->name, $c->name);
		}      
                
        $race = new Zend_Form_Element_Select('race');
        $race->setLabel('Select your race: ')
                 ->setRequired(true);
                 
        foreach($raceTbl->fetchAll() as $r) {
         	$race->addMultiOption($r->name, $r->name);
        }
                               
        $begin = new Zend_Form_Element_Submit('begin');
        $begin->setLabel('Game On!')
                ->setIgnore(true);
        
       	$this->addElements(array(
                        $alias,
                       // $class,
                        $race,
                        $begin
                        ));  
    }


}

